<template>
	<div>
		<detail-banner 
				:sightName="sightName" 
				:bannerImg="bannerImg"
				:gallaryImgs="gallaryImgs"
		></detail-banner>
		<detail-header></detail-header>
		<detail-list :categoryList="categoryList"></detail-list>
	</div>
</template>

<script>
import axios from 'axios'
import DetailBanner from './components/Banner'
import DetailHeader from './components/header'
import DetailList from './components/list'
export default{
	name: 'Detail',
	components:{
		DetailBanner,
		DetailHeader,
		DetailList
	},
	methods:{
		getDetailInfo:function(){
			axios.get('/api/detail.json').
			then(this.getDetailInfoSucc)
		},
		getDetailInfoSucc:function(res){
			res= res.data
			if(res.data&&res.ret){
				const data= res.data
				this.sightName= data.sightName
				this.bannerImg= data.bannerImg
				this.gallaryImgs= data.gallaryImgs
				this.categoryList= data.categoryList
			}
		}
	},
	data:function(){
		return {
			sightName:'',
			bannerImg:'',
			gallaryImgs:[],
			categoryList:[]
		}
	},
	mounted(){
		this.getDetailInfo()
	}
}
</script>

<style lang="stylus" scoped>
	
</style>
